Reusing domain-specific rules in a cloud-based internet of things system

ABSTRACT

The disclosure provides Internet of Things (IoT) systems organized as tree hierarchies in which rule processing can occur at each level of the tree hierarchies. In the IoT system according to one embodiment, formulas are defined and centrally managed at a cloud hub that is a root of a tree hierarchy. Each formula defined at the cloud hub is further percolated down to a hub, which may be the cloud hub itself or a local hub, in the tree hierarchy that is logically closest to devices specified in the formula. Each of the cloud and local hubs in the IoT system may utilize the same core IoT platform image, providing ease of management. In addition, formulas may be defined with basic stimuli and responses, as well as with higher-order stimuli and responses that combine one or more other stimuli and responses, respectively.

RELATED APPLICATIONS

Benefit is claimed under 35 U.S.C. 119(a)-(d) to Foreign ApplicationSerial No. 201841003096 filed in India entitled “REUSING DOMAIN-SPECIFICRULES IN A CLOUD-BASED INTERNET OF THINGS SYSTEM”, on Jan. 25, 2018, byVMware, Inc., which is herein incorporated in its entirety by referencefor all purposes.

The present application Ser. No. 15/921,691 is related in subject matterto U.S. patent application Ser. No. 15/921,681 and U.S. patentapplication Ser. No. 15/921,684, which is incorporated herein byreference.

BACKGROUND

“Smart devices” have become increasingly popular and can be found inmany places, including cars, home security systems, and health monitors,among others. A smart device is an electronic device, generallyconnected to other devices or networks, that can operate to some extentinteractively and to some extent autonomously. Smart devices includesensors that collect sensor or measurement data about theirenvironments, and actuators that accept instructions or commands andperform actions in the physical world. Examples of sensors include smartsmoke detectors, thermometers, heart rate monitors, continuous glucosemeters, etc. Examples of actuators include smart fire alarms, sprinklersystems, insulin injector implantations, etc. Many smart devices areable to communicate with other devices over the Internet. Together,smart devices communicating with each other are popularly referred to asthe Internet of Things (IoT). The terms “IoT device” and “smart device”are used interchangeably herein.

IoT systems have been developed that allow responses to be triggered byactuator device(s) upon the receipt of appropriate stimuli from sensordevice(s). For example, a diabetes patient can connect his or hercontinuous glucose meter (CGM) into the cloud, where a rule may executecausing insulin to be injected via an insulin injector device implantedon the patient's body (the response) if the patient's blood sugar levelas measured by the CGM crosses a threshold value (the stimulus). SuchIoT systems currently exist as cloud-based PaaS (platform as a service)solutions or are run privately as middleware applications by, e.g.,enterprises. In the cloud-based PaaS solutions, sensors and actuatorsare connected to a cloud, where the processing and storage of sensordata and the triggering of responses occurs. Popular cloud-based PaaSsolutions include AWS® IoT Cloud, IBM Bluemix®, and Azure® IoT. Theadvantages of such cloud-based PaaS solutions include central managementof devices in the cloud, scalability (any number of additional IoTdevices may be connected to the cloud and rules added to the cloud), andfault tolerance. The disadvantages of cloud-based PaaS solutions includenetwork latency and unreliability, as the triggering of responses may bedelayed by network latency or not occur at all if the Internetconnections of sensors and/or actuators are lost. Privacy is also aconcern when sensitive data from a sensor belonging to one organizationis sent to a “public” cloud that is managed by a different organizationand shared by many tenants. There may also be legal limitations tosending confidential sensor data to the cloud. For example, some sensordata may not be allowed to be stored across certain geographicboundaries if the data is for government, defense, or financialinstitutions. This is an issue because the exact storage location of apublic, multi-tenant cloud is usually not controlled by tenants.

In contrast to cloud-based PaaS solutions, private IoT systems ensuredata privacy by using a local server or cluster of servers to process(and store) sensor data and to send instructions to actuators. Popularprivate IoT systems include ThingWorx®, Nextcloud® Box, and the opensource Kaa. The disadvantages of private IoT systems include lack ofscalability and difficulty incorporating new domain knowledge andsensors. Scalability may be an issue, as privately managed data centersare expensive to run and expand. For example, in an industrialautomation scenario, the number of smart devices may increaseexponentially as new smart devices are adopted, but a private IoT systemmay be not be scalable to incorporate such new smart devices. New domainknowledge and sensors are difficult to incorporate into private IoTsystems, as doing so typically requires the rules engine of a localserver or cluster of servers (of which there may be many) to be manuallyupdated each time new domain knowledge or sensors are added. Forexample, a medical IoT system should be able to administer differentcombinations of drugs or interpret symptoms differently based on thelatest research without changing existing sensors, but it can bedifficult to continuously update a local rules engine in a privatemedical IoT system based on the latest research.

SUMMARY

One or more embodiments provide a method of processing data in aninternet-of-things (IoT) system. The method generally includes receivingdata collected by a plurality of sensor devices. The method furtherincludes evaluating the received data to determine whether each of aplurality of stimuli is satisfied, with a higher-order stimulus definedin terms of the plurality of stimuli being satisfied when each of theplurality of stimuli is satisfied. In addition, the method includes,when the higher-order stimulus is satisfied, causing one or more devicesto perform a response specified in a formula that associates thehigher-order stimulus with the response.

Further embodiments include a non-transitory computer-readable storagemedium storing instructions that, when executed by a computing systemcause the computer system to perform the method set forth above, and acomputing system programmed to carry out the method set forth above.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an Internet of Things (IoT)system in which one or more embodiments of the present disclosure may beutilized.

FIG. 2 is a block diagram illustrating a data center in which a hubruns, according to an embodiment.

FIG. 3 is a block diagram illustrating components of a cloud hub in anIoT system, according to an embodiment.

FIG. 4 is a block diagram illustrating components of a local hub in anIoT system, according to an embodiment.

FIG. 5 depicts a flow diagram of a method for determining whether toprocess a formula locally or to propagate the formula down a treehierarchy and subscribing to data streams, according to an embodiment.

FIG. 6 is a flow diagram illustrating a method for evaluating sensordata and activating actuators when stimuli are satisfied, according toan embodiment.

To facilitate understanding, identical reference numerals have beenused, where possible, to designate identical elements that are common tothe figures. It is contemplated that elements disclosed in oneembodiment may be beneficially utilized on other embodiments withoutspecific recitation.

DETAILED DESCRIPTION

Embodiments disclosed herein relate to Internet of Things (IoT) systemsorganized as tree hierarchies in which rule processing can occur at eachlevel of the tree hierarchies. In the IoT system according to oneembodiment, formulas are defined and centrally managed at a cloud hubthat is a root of a tree hierarchy. As used herein, a “hub” refers to avirtual computing instance or a cluster of virtual computing instances(or physical machine(s)) that run an instance of an IoT platform, and a“formula” refers to a rule associating a stimulus, which may be definedas a function over data from one or more sensor devices, to a responsein the form of actions performed by one or more actuator devices. Eachformula defined at the cloud hub is percolated down to a hub, which maybe the cloud hub itself or a local hub, in the tree hierarchy that islogically closest to devices specified in the formula. Such a logicallyclosest hub is (1) a common parent (or ancestor) in the tree hierarchyof devices specified in the formula, and (2) nearest to those devices inthe tree hierarchy, i.e., lowest in the tree hierarchy if the cloud hubis a root at the top of the tree hierarchy and devices of the IoT systemare leafs of the tree hierarchy. By persisting and executing the formulaat a logically closest hub rather than always in the cloud, the networklatency and failure issues described above as being drawbacks tocloud-based PaaS IoT systems can be avoided. Further, sensor datautilized to process the formula is not percolated up the tree hierarchybeyond the logically closest hub where the formula processing occurs,thereby maintaining privacy by, e.g., preventing sensitive sensor datafrom being sent to a public cloud. Further yet, by defining/managingformulas in a central cloud hub and percolating those formulas down tolocal hubs, new domain knowledge and sensors can be incorporated withoutrequiring the local hubs to be manually updated. In addition, the IoTsystem may be scaled horizontally by adding processing nodes (e.g.,virtual machines) to a hub, as well as vertically by adding more hubs tothe tree hierarchy.

In one embodiment, each of the cloud and local hubs in the IoT systemutilize the same core IoT platform image, providing ease of management.In particular, the cloud and local hubs may each include clusters ofvirtual computing instances (or physical machines), such as virtualmachines (VMs) or containers, that execute the IoT platform in order toprocess sensor data and trigger responses. Deployment, upgrading,versioning, and the like are centrally handled by the cloud hub. Forexample, the cloud hub may propagate the IoT platform image (orupgrades) down to local data centers in order to deploy local hubstherein using the IoT platform image (or upgrades). In addition, eachhub handles failures of individual virtual computing instances (orphysical machines) by re-assigning data processing to other virtualcomputing instances (or physical machines) in the hub's cluster, therebyproviding fault tolerance at the hub level.

In another embodiment, the cloud hub permits formulas to be defined withbasic stimuli and responses, as well as with higher-order stimuli andresponses that combine previously defined stimuli (with other stimuliand/or raw sensor data) and responses, respectively. Doing so permitsusers to codify domain-specific knowledge in a form that isunderstandable to other users and can be incorporated into formulas,without having to deal with low-level devices. For example, assume athermometer provides raw temperature data that satisfies a stimulus of“fever” if a body temperature is greater than 38° C. In such a case, ahigher-order stimulus associated with another medical condition (e.g., aheart attack) may be defined that requires the fever stimulus as well asone or more other stimuli, such as an elevated heart rate above athreshold value. In turn, a response may be triggered when thehigher-order stimulus is satisfied based on a stored formula that mapsthe higher-order stimulus to the response.

FIG. 1 is a block diagram illustrating an IoT system in which one ormore embodiments of the present disclosure may be utilized. As shown,IoT system 100 is organized in a tree hierarchy. Cloud 102 and local 104hubs are root and branch nodes of the tree hierarchy, respectively,while sensor 148 and actuator 150 devices are leaf nodes of the treehierarchy. Each of cloud 102 and local 104 hubs may include a virtualcomputing instance, such as VMs or containers, or a cluster of virtualcomputing instances or physical machine(s) provides an instance of anIoT platform. In one embodiment, cloud hub 102 may be shared among andmanage multiple tenants, as described in greater detail below, whilelocal hubs 104 may be owned by individual tenants. In such a case, itmay appear to each tenant as if they are the only user of IoT system100.

Cloud hub 102 is responsible for deploying and updating the IoT platformsoftware of local hubs 104 in the tree hierarchy, as well as managinglocal hubs 104 and devices, including sensors 148 and actuators 150. Forexample, a user may purchase hardware (e.g., one or more servers orother computing systems) for a local hub 104 and install on the hardwarebootstrapping software that automatically downloads a VM image of theIoT platform from cloud hub 102 and executes VM(s) that use the image ofthe platform image. Upgrades and new versions of the IoT platform maylikewise be downloaded and executed automatically. In addition, cloudhub 102 may store the entire structure of the tree hierarchy in oneembodiment, allowing the tree hierarchy to be recreated (by redeployinglocal hubs, etc.) if necessary, such as when hub(s) fail.

Each hub in IoT system 100 may have any number of direct child hubs anddirectly connected sensors and actuators. As used herein, a “directchild” or a node located “directly” underneath another node in the treehierarchy refers to a hub or device that is connected to a parent hubwithout an intermediary hub between the node and the parent hub in thetree hierarchy. For example, local hub 104 ₂ is a direct child of localhub 104 ₁, and local hub 104 ₁ is a direct parent of local hub 104 ₂. Incontrast, an “indirect child” or node located “indirectly” underneathanother node in the tree hierarchy refers to a hub or device that isconnected to a parent hub through an intermediate hub in between thechild and the parent. For example, local hub 104 ₃ is an indirect childof local hub 104 ₁, and local hub 104 ₁ is an indirect parent of localhub 104 ₃. Indirect parents are also referred to herein as ancestors.

Cloud hub 102 is connected to its direct children through a network,which as shown is a wide area network (WAN) (e.g., the Internet). In oneembodiment, cloud hub 102 runs in a public cloud shared by tenants fromseparate organizations. In another embodiment, cloud hub 102 may run ina private cloud owned and operated by a single organization.

Each of local hubs 104 may be connected to any number of sensors 148 andactuators 150 through a network, which is shown as a local area network(LAN) but may be any reliable and fast connection, such as a directlink, a Multiprotocol Label Switching (MPLS) network, a “stretched”layer-2 (L2) network, or even a WAN. As described, a sensor is a devicethat senses or measures certain characteristics of the physical worldand converts the measurements into data for processing, while anactuator is a type of device that accepts digital instructions orcommands and performs action(s) in the physical world. Sensors andactuators may also be combined in some devices.

In addition to being connected to sensors 148 and actuators 150, eachlocal hub 104 may also be in communication with other local hub(s) 104through network(s), which as shown are LANs (e.g., LANs overlaid on aWAN such as the Internet) but may generally be any type of network. Eachof local hubs 104 may manage any number of other local hubs 104, leadingto a tree hierarchy structure having cloud hub 102 as a root node thatmanages all local hubs and devices, local hubs 104 as branch nodes thatmanage child hubs and devices, and sensors 148 and actuators 150 as leafnodes. In one embodiment, configuration and state information relatingto devices 148 and 150 may be managed by local hubs 104 directlyconnected to those devices and also percolated up the tree hierarchy toall (direct and indirect) parent hubs, including cloud hub 102.

The organization of cloud hub 102, local hubs 104, and sensors 148 andactuators 150 into a tree hierarchy in IoT system 100 provides a numberof advantages. As described, formulas may be defined at cloud hub 102but percolated down to local hubs 104 that are logically closest todevices specified in the formulas. Local hubs 104 may then operateindependently to process data and issue instructions to actuatorsaccording to stored formulas, without having to send data to the cloud.As a result, the low latency requirements of many real world smartdevices may be satisfied. For example, a local hub and devices connectedto that hub may be on the same private network (e.g., a LAN), resultingin minimal network latency and the ability to process sensor data evenwhen Internet connectivity to the cloud hub is lost. Further, byprocessing sensor data at the logically closest hub and not percolatingsuch data further up the tree hierarchy, privacy is maintained by, e.g.,preventing sensitive sensor data from being sent to a public cloud. Asformulas are defined and managed at a central cloud hub 102 andpercolated down the tree hierarchy to local hubs 104, new domainknowledge and sensors can be incorporated using new formulas defined atcloud hub 102, without requiring manual updating of local hubs 104. Inaddition, the IoT system 100 is easily scalable, as each of the localhubs 104 and cloud hub 102 is independently scalable “horizontally” byadding more virtual computing instances and/or physical machines to thathub, and IoT system 100 is also scalable “vertically” by adding morehubs to the tree hierarchy (e.g., at new levels of the tree hierarchy).For example, virtual computing instances (and associated hardware, orsimply hardware if virtual computing instances are not used) may beadded to a hub cluster when that cluster does not have enough compute,memory, and/or disk resources to process data generated by devicesrelying on the cluster. Or another hub could be created to process someof the device data that the hub cluster does not have enough compute,memory, and/or disk resources to process. Vertical scaling may also beutilized for security purposes to create another hub at which sensordata is processed but not permitted to percolate further up the treehierarchy.

FIG. 2 is a block diagram illustrating a data center 200 in which a hubruns, according to an embodiment. The hub may be one of local hubs 104or cloud hub 102 (in which case there would be no parent hub 202).Although shown for illustrative purposes as VMs 220 running in datacenter 200, it should be understood that a hub may generally include anynumber of virtual computing instance(s) and/or physical machine(s) whichmay (or may not) form a cluster and run an instance of an IoT platform.As discussed in greater detail below with respect to FIGS. 3-4, the VMsin a hub may run a number of core modules of the IoT platform, as wellas additional modules if the hub is a cloud hub.

As shown, data center 200 includes hosts 205, a virtualization manager230, and a gateway 224. Each of hosts 205 may be constructed on a servergrade hardware platform 206, such as an x86 architecture platform. Forexample, hosts 205 may be geographically co-located servers on the samerack. As shown, hardware platform 206 of each host 205 may includeconventional components of a computing device, such as one or moreprocessors (CPUs) 208, system memory 210, a network interface 212,storage system 214, optionally a local host bus adapter (HBA) 215, andother I/O devices such as, for example, a mouse and keyboard (notshown).

CPU 208 is configured to execute instructions, for example, executableinstructions that perform one or more operations described herein andmay be stored in memory 210 and in storage. Memory 210 is hardwareallowing information, such as executable instructions, configurations,and other data, to be stored and retrieved. Memory 210 is where programsand data are kept when the processor is actively using them. Memory 210may be byte-addressable, random access memory. Memory 210 may include,for example, one or more random access memory (RAM) modules. Networkinterface 212 enables host 205 to communicate with other devices via acommunication medium, such as a network 122 within data center 200.Network interface 212 may include one or more network adapters, alsoreferred to as Network Interface Cards (NICs). Storage system 214represents local persistent storage devices (e.g., one or more harddisks, flash memory modules, solid state disks, and/or optical disks).Host bus adapter (HBA) couples host 205 to one or more external storages(not shown), such as a storage area network (SAN). Other externalstorages that may be used include network-attached storage (NAS) andother network data storage systems, which may be accessible via NIC 212.

As shown, host 205 is configured to provide a virtualization layer, alsoreferred to as a hypervisor 216, that abstracts processor, memory,storage, and networking resources of hardware platform 206 into multiplevirtual machines 220 ₁ to 220 _(N) (collectively referred to as VMs 220and individually referred to as VM 220) that run concurrently on thesame hosts. One example of a hypervisor 216 that may be used in oneembodiment is a VMware ESXi™ hypervisor provided as part of the VMwarevSphere® solution made commercially available from VMware, Inc. of PaloAlto, Calif. Hypervisor 216 may run on top of the operating system inhost 205 or directly on hardware components of host 205.

A virtualization management component 230 communicates with hosts 205via a network, shown as a management network 226, and carries outadministrative tasks for data center 200 such as managing hosts 205,managing local VMs 220 running within each host 205, provisioning VMs,migrating VMs from one host to another host, and load balancing betweenhosts 205. Virtualization manager 230 may be a computer program thatresides and executes in a central server in data center 200 or,alternatively, virtualization manager 230 may run as a VM in one ofhosts 205. One example of a virtualization manager is the vCenterServer™ product made available from VMware, Inc.

Gateway 224 (e.g., executing as a virtual appliance) provides VMs 220and other components in data center 200 with connectivity to a network146 used to communicate with an (optional) parent hub 202, child hub(s)204, sensor(s) 148, and actuator(s) 150. Any suitable network 146 may beused, such as one or more of: a LAN, a WAN, a direct link, a PAN, MPLS,or a “stretched” L2 network. Further, although one network 146 is shownfor simplicity, it should be understood that VMs 220, parent hub 202,child hub(s) 204, sensor(s) 148, and actuator(s) 150 may generallycommunicate via any number of networks. Gateway 224 may manage externalpublic IP addresses for VMs 220 and route traffic incoming to andoutgoing from data center 200 and provide networking services, such asfirewalls, network address translation (NAT), dynamic host configurationprotocol (DHCP), and load balancing. Although a gateway 224 providingconnectivity to sensor(s) 248 and actuator(s) 250 via network 246 isshown for illustrative purposes, it should be understood that a gatewaymay be unnecessary in some embodiments (e.g., when a hub and sensors andactuators connected to the hub are on the same local network).

In one embodiment, cloud hub 102 may include VMs that are deployed usingthe same core IoT platform VM image that is used to deploy VMs in localhubs 104. It should be understood that the core IoT platform VM imagemay include the same code that is executed in cloud 102 and local hubs104, but the data being stored and processed by VMs in each of the cloud102 and local hubs 104 may be different if the hubs are connected todifferent sensor devices. In addition, the cloud hub VM image mayinclude some (e.g., management) modules that are not present in the coreIoT platform image used by local hub 104 VMs, as discussed in greaterdetail below with reference to FIGS. 3-4. As the VMs of cloud 102 andlocal hubs 104 are deployed using an identical core IoT platform image,management of such VMs is simplified. For example, to deploy or updateIoT system 100, a core IoT platform image (or an updated image) in theform of a VM snapshot may be pushed down from cloud 102 to local hubs104, and VMs may then be deployed and executed in local hubs 104 usingthe VM snapshot image.

VMs 220 that perform the functions of an IoT platform, includingprocessing sensor data and issuing instructions to actuators, constitutean “instance” of the IoT platform that is also a hub in IoT system 100.In one embodiment, each of cloud hub 102 and local hubs 104 may beimplemented as a cluster of VMs. The VMs within such a cluster may beallocated to process data from sensors and/or send instructions toactuators in any suitable manner. In one embodiment, processing withineach of cloud hub 102 and local hubs 104 may be distributed among VMsusing a consistent hashing technique, and the processed results may becombined together using a conflux technique, described in V. Eswara etal., “Conflux: Distributed, real-time actionable insights on high-volumedata streams”, Computer Measurement Group 3^(rd) Annual Conference(2016), which is incorporated by reference herein in its entirety.Consistent hashing techniques are useful for distributing workloadsacross processing nodes using a consistent hash function which changesminimally as the range of the function changes. Conflux techniques areuseful for merging data streams to provide distributed, real-timeinsight into (high-volume) data streams. Together, consistent hashingand conflux techniques may be utilized to distribute the processing ofdata streams from sensors and combine the results into actions to beperformed by actuators. It should be understood that the use ofconsistent hashing and conflux techniques permits workloads to beautomatically rebalanced when VMs in the cluster of VMs go down or newVMs are added to the cluster, without any downtime. This is in contrastto the manual updating of the rules engine in private IoT systemsdescribed above, which requires downtime when new sensors are added.

FIG. 3 is a block diagram illustrating components of cloud hub 102 inIoT system 100, according to an embodiment. FIG. 4 is a block diagramillustrating components of a local hub 104 in IoT system 100, accordingto an embodiment. As shown, VMs, including VMs 220 and 121 (which may beother types of virtual computing instances such as containers orphysical machines in alternative embodiments) run in hosts 105 and 107,respectively, and execute the same logical modules of the core IoTplatform, shown as modules 162-170. In addition, certain logicalmodules, shown as modules 154, 156, and 158, run uniquely in cloud hub102 VMs and are not present in local hub 104 VMs.

The modules that are unique to cloud hub 102 include a tenant managementmodule 154, a user interface (UI) module 156, and a central analyticsmodule 158. Tenant management module 154 of VM 220 manages tenants andcorresponding users associated with the tenants of data center 200. Inone embodiment, tenant management module 154 tracks which devices (e.g.,sensors 148 and actuators 150) and tree hierarchies are associated withwhich user and tenant, and tenant management module 154 further managesaccess to tenant data to ensure that tenants do not have access to eachother's data.

Another module unique to cloud hub 102 is UI module 156, which supportsdata and cluster visualization for management of devices and offormulas, stimuli, and responses. For example, a user may definestimuli, responses, and/or formulas through a UI provided by UI module156. As described, each formula defined at cloud hub 102 is percolateddown the tree hierarchy to a local hub 104 that is logically closest todevices specified in the formula. UI module 156 may also permithigher-order stimuli and responses to be defined in terms of previouslydefined primitives over raw data, including previously defined stimuli,responses, and formulas, rather than raw sensor data itself. Forexample, higher-order stimuli and responses may be defined that combineother stimuli and responses, respectively, such as the stimuli andresponses in previously defined formulas. In one embodiment, eachpreviously defined stimulus and response may be associated with auser-given name (e.g., “fever”), and UI module 156 may display to a userin a domain (e.g., an organization) the names of previously definedconstructs including stimuli, responses, and formulas (which includestimuli and responses) in the same domain and permit the user to re-usethose stimuli and responses to define new stimuli and responses,respectively, that may be used in formulas. UI module 156 may alsosupport management in a tenant-aware manner, in conjunction with tenantmanagement module 154.

Yet another module unique to cloud hub 102 is central analytics module158, which supports various data processing requirements. Data that isprocessed by central analytics module 158 may include data associatedwith one or more tenants, and central analytics module 158 may generallyperform more complex data processing than that performed by datasubscription and processing (DSP) module 166 within local hubs 104,discussed in greater detail below. In particular, central analyticsmodule 158 may process a larger amount of data encompassing a longerperiod of time than data processed by DSP module 166, and centralanalytics module 158 may also perform complex analyses such as therunning of machine learning algorithms on the data. In some embodiments,central analytics module 158 may support data processing frameworks suchas Apache Spark™, Apache Storm™, Apache Flume™, and the like.

As shown, the core IoT platform modules that execute in both cloud hub102 and local hubs 104 include a cluster management module 160; anapplication programming interface (API) module 162; a stimuli, response,and formula management module 164; a data subscription and processingmodule 166; a device management module 168; a security module 170; and adevice and cross-protocol gateway (DCPG) module 172. As shown, clustermanagement module 160 manages the cluster of VMs running in a hub, suchas VMs 120 in cloud hub 102 or VMs 121 in local hub 104. The cluster ofVMs is managed by cluster management module 160 to form a single, highlyavailable, and fault-tolerant instance of the IoT platform whichprocesses sensor data and issues actuator instructions. As described,high availability and fault-tolerance may be achieved using consistenthashing and conflux techniques in one embodiment.

API module 162 exposes an API allowing create, read, update, delete(CRUD) operations on stimuli, responses, and formulas in IoT system 100.Such operations permit users to create, read, and modify how stimuli aredefined and what responses occur as a result of the stimuli. As usedherein, a stimulus may include raw (unprocessed) data from a singlesensor crossing a threshold, such as a temperature reading at or above38° C., or a stimulus may be a complex, derived, or inferred value basedon some aggregate or function of data received from one sensor (e.g.,over a time period) or from a set of distinct sensors. For example, a“rain warning” stimulus may occur from a daily aggregate thresholdfunction of temperature and pressure data collected from multiplesensors over a specific neighborhood. A stimulus function may be denotedas ST(s1, s2, . . . sn), which is a stimulus function over sensors s1through sn. A response may include the action of triggering an actuator,or in a more complex case, triggering one or more actuators, in acertain order, for a certain period of time each, in a certain manner.For example, a motion detector stimulus may trigger a “burglar alarm”response, which may involve turning on lights and an audio alarm, aswell as contacting law enforcement over a secure connection through theInternet and/or telephone. A response function may be denoted as R(a1,a2, . . . an), which is a response function over actuators a1 throughan. A formula is a function that associates a stimulus with a responseby causing the triggering of the response in reaction to the stimulusbeing satisfied. For example, a formula may be defined associating theburglar alarm response with the motion detection stimulus describedabove. A formula function may be denoted as F=(ST(s1, s2, . . .sn)→R(a1, a2, . . . an)), where the “→” separates the stimulus functionon the left from the response function on the right, and maps thestimulus to the response. Although described herein primarily withrespect to stimuli and responses that are defined as part of a formula,it should be understood that stimuli and responses may also be definedindependently of any formulas. For example, stimuli and responses may bedefined as “building blocks” for higher order stimuli and responses,discussed above, which may themselves be used in formulas.

API module 162 also supports registering devices (e.g., sensors 148 andactuators 150) and registering local hubs 104 with their (direct andindirect) parent hubs, including cloud hub 102. Registering of devicesin IoT system 100 may be performed in conjunction with device managementmodule 168, as described in greater detail below. API module 162 furthersupports subscribing to data streams, which may include raw sensor dataand/or processed/aggregated data, from sensors 148 and hubs 104 whichare direct or indirect children of the hub in which API module 162 runs.In an embodiment, the API exposed by API module 162 is a HypertextTransfer Protocol (HTTP) Representational State Transfer (REST) basedAPI.

Stimuli, response, and formula management (SRFM) module 164 supportstenant-specific CRUD operations on stimuli, responses, and formulaswithin cloud hub 102, as exposed by API module 162. In particular, SRFM164 subscribes to sensor data streams required to evaluate stimulusfunctions and to trigger responses. SRMF 164 is also responsible forformula percolation down the tree hierarchy, as described below withreference to FIG. 5.

Data subscription and processing (DSP) module 166 receives sensor datafrom all subscribed sources and evaluates whether the data satisfiespre-defined stimulus function definitions. If the data satisfies astimulus function definition, DSP module 166 activates targetactuator(s) 150 associated with the stimulus based on a formula relatingthe stimulus to a response. DSP module 166 may also persist sensor datait receives and/or stimulus inferences that it determines in a storage,such as storage 214. DSP module 166 is described in greater detail belowwith reference to FIG. 6. In addition to stimuli defined in terms of rawsensor data, higher-order stimuli and responses may also be definedusing previously defined (and named) primitives over raw sensor data,which may include previously defined stimuli, responses, and formulas.For example, a high-order stimulus may be defined that includes one ormore other stimuli from previously defined formula(s) being satisfied,and similarly responses may be combined with other responses frompreviously defined formula(s) to define a higher-order response. DSPmodule 166 may also evaluate whether such higher-order stimuli aresatisfied in one embodiment. As described, one example of a higher-orderstimulus may require a “fever” stimulus that is satisfied when apatient's body temperature is above 38° C. to occur at the same time asan elevated heart rate stimulus that is satisfied when the patient'sheart rate is above a threshold, and such a higher-order stimulus may beassociated with a particular medical condition (e.g., a heart attack).It should be understood that, by defining higher-order stimuli,inferences may be made of such stimuli and displayed to a user (ratherthan inferences of stimuli based on raw sensor data) and/or utilized informulas.

Device management module 168 makes use of the gateway provided by DCPGmodule 172 to manage devices (e.g., sensors 148 and actuators 150) thatare being added to or removed from IoT system 100. Device managementmodule 168 also handles device discovery and assists with deviceregistration, in which each device is assigned a unique hierarchicalidentifier. As used herein, device discovery refers to theidentification of a device that has connected to a hub, whileregistration is the process by which the hub that discovers a deviceassigns a globally unique hierarchical identifier to the device andpercolates the unique hierarchical identifier up the tree hierarchy. Thedevice management module 168 running in cloud hub 102 may also track thestate of each device in IoT system 100 so that the overall health of IoTsystem 100 may be evaluated.

In one embodiment, local hubs 104 may also be assigned globally uniqueidentifiers. In such a case, each device 148 or 150 and local hub 104may be addressed using a dot notation that sequentially concatenates allhub identifiers required to reach that device 148 or 150 or local hub104. For example, in FIG. 1, sensor 148 ₃ is managed by hub 104 ₃, whichin turn is managed by hub 104 ₂ that is itself managed by hub 104 ₁, andhub 104 ₁ is managed by cloud hub 102. The identifier of sensor 148 ₃ indot notation may then be: 104 ₁.104 ₂.104 ₃.148 ₃. As another example,the identifier of sensor 148 ₄ may simply be 148 ₄, as sensor 148 ₄ isdirectly connected to cloud hub 102. As the identifiers for devices andhubs are namespaced under their respective tenants, this addressingscheme ensures tenant validation when defining new stimuli, responses,and formulas over devices. As described in greater below with respect toFIG. 5, this addressing scheme may also be used by hubs that receivestimulus, response, and formula definitions to determine whether topercolate those definitions down the tree hierarchy for processing byanother hub or to perform such processing locally.

Device management module 168 may also map unique hierarchicalidentifiers to protocol-specific identifiers for each device. Forexample, with the Message Queue Telemetry Transport (MQTT) protocol, theMQTT “client id” may be mapped to hierarchical identifiers generated bydevice management module 168.

Security module 170 manages secure communications between devices andmodules 154-172 running in VM 220. For example, tenants of IoT system100 may configure and manage security certificates used to communicatebetween hubs 102 or 104 and devices, such as sensors 148 and actuators150.

Device and cross-protocol gateway (DCPG) module 172 is responsible forconverting data and commands from protocols used by devices to messageformats that are used by one or more of modules 154-170. For example,DCPG module 172 may convert MQTT, WebSockets, HTTP, Advanced MessageQueuing Protocol (AMQP), Bluetooth, and/or Zigbee messages received fromdevices into JavaScript Object Notation (JSON) messages that eachinclude a tuple of ID, timestamp, and value. Such a tuple may then behashed, when one of the JSON messages lands on a consistent hashingring, according to the consistent hashing technique described above todetermine a virtual computing instance (or a physical machine) in acluster to process the sensor data in a message.

FIG. 5 depicts a flow diagram of a method 500 for determining whether toprocess a formula locally or to propagate the formula down a treehierarchy and subscribing to data streams, according to an embodiment.As shown, method 500 begins at step 502, where a hub (e.g., cloud hub102 or one of local hubs 104) receives a user-defined formula. Asdescribed, a user may utilize a UI to define a formula at cloud hub 102that is a root of the tree hierarchy, and the formula is then percolateddown the tree hierarchy to a hub that is logically closest to devicesspecified in the formula. Defining a formula may include defining astimulus function and a response function, and associating the twowithin the formula. Examples of formulas are F1=(ST(148 ₁)→R(150 ₁)) andF2=(ST(148 ₂, 148 ₃)→R(150 ₃)). Formula F1 specifies that if data fromsensor 148 ₁ evaluates to a stimulus, then activate actuator 150 ₁.Formula F2 specifies that if data from sensors 148 ₂ and 148 ₃ evaluateto a stimulus, then activate actuator 150 ₃. Formulas F1 and F2 assumethat local hubs 104 ₁, 104 ₂, and 104 ₃ are all owned by the sametenant. In addition, it should be understood that devices such asdevices 148 ₁, 148 ₂, 148 ₃, and 150 ₃ may be specified in formulas bytheir dot-notation addresses, which in the cases of devices 148 ₁, 148₂, 148 ₃, and 150 ₃ are 104 ₁.148 ₁, 104 ₁.104 ₂.148 ₂, 104 ₁.104 ₂.104₃.148 ₃, and 104 ₁.104 ₂.104 ₃.150 ₃, respectively.

At step 504, the hub parses the received formula and determines whetherthat hub is logically closest to the sensor and actuators specified inthe formula. As described, logically closest includes being (1) a commonparent (or ancestor) in the tree hierarchy of devices specified in theformula, and (2) nearest to those devices in the tree hierarchy, i.e.,lowest in the tree hierarchy if the cloud hub is a root at the top ofthe tree hierarchy and devices of the IoT system are leafs of the treehierarchy. For example, a hub may be logically closest to devicesspecified in a formula if those devices are directly connected to thehub and none of those devices are directly connected to child hubs. Inone embodiment, the hub (and, specifically, SRFM module 164 running inthe hub) determines a common prefix of all addresses of devicesspecified in the formula. Such a common prefix of device addresses willusually reveal the hub that is logically closest to those devices, andif the device addresses do not share a common prefix, then the formulamay be stored in cloud hub 102. As described, configuration and stateinformation of devices managed by local hubs 104 are stored locally andalso percolated up the tree hierarchy to all parent hubs 104 (if any)and to cloud hub 102. As a result, the cloud 102 and parent 104 hubs areaware of devices (and associated addresses) that are directly connectedto them, as well as devices (and associated addresses) in the sub-treeunder them. The addresses of such directly-connected devices and devicesin the sub-tree may then be used to determine the common prefix that theaddresses of devices specified in a formula share, which may in turn beused to determine where the formula should be percolated down the treehierarchy. Returning to the example formula F1 above, the dot-notationaddresses of sensor 148 ₁ and actuator 150 ₁ are 104 ₁.148 ₁ and 104₁.150 ₁, respectively. The common prefix in this case is 104 ₁,indicating that the formula should be percolated to local hub 104 ₁. Asa result, cloud hub 102 will send formula F1 down to local hub 104 ₁,while local hub 104 ₁ will store and process formula F1 locally, withoutpercolating the formula further down the tree hierarchy. As anotherexample, in the case of formula F2 above, the dot-notation addresses ofsensors 148 ₂ and 148 ₃ and actuator 150 ₃ that are specified in formulaF2 are 104 ₁.104 ₂.148 ₂, 104 ₁.104 ₂.104 ₃.148 ₃, and 104 ₁.104 ₂.104₃.150 ₃, respectively. In this case, the common prefix of the deviceaddresses is 104 ₁.104 ₂, indicating that local hub 104 ₂ should storeand process formula F2.

If the hub determines at step 504 that the hub is not logically closestto the devices specified in the formula, then at step 506, the hub sendsthe formula to an appropriate child hub. In one embodiment, the hub maysend the formula to the next local hub 104 in the common prefix of thedot-notation addresses of devices specified in the formula. Returning tothe example of formula F1 above, cloud hub 102 may send formula F1 tolocal hub 104 ₁, as the common prefix of the addresses of sensor 148 ₁and actuator 150 ₁ specified in formula F1 is 104 ₁. Similarly, forformula F2 above, cloud hub 102 may send formula F2 to local hub 104 ₁,as the common prefix of the addresses of sensors 148 ₂ and 148 ₃ andactuator 150 ₃ specified in formula F2 is 104 ₁.104 ₂ and local hub 104₁ is a direct child of cloud hub 102 (while local hub 104 ₂ is not). Inturn, local hub 104 ₁ may send formula F2 down to its child local hub104 ₂ based on the common prefix.

If, on the other hand, the hub determines at step 504 that the hub islogically closest to the devices specified in the formula, then at step508, the hub stores the formula locally. For example, the formula may bestored in memory or storage of host(s) in which VM(s) of the hubexecute, or alternatively in external storage that is connected to suchhosts through HBAs.

At step 510, the hub determines whether any sensors 148 in the formulaare not directly connected to the hub itself. Returning to the exampleabove, formula F2 is stored at local hub 104 ₂ but requires data fromsensor 148 ₃, which is not directly connected to local hub 104 ₂ but isinstead directly connected to local hub 104 ₃. It should be understoodthat data from such a sensor that is not directly connected to the hubneeds to be obtained through another hub that is directly connected tothe sensor.

If the hub determines that any sensors 148 specified in the formula arenot directly connected to the hub, then at step 512, the hub subscribeswith child hub(s) to receive the required sensor data. For example, thissubscribing step may include SRFM module 164 notifying DSP module 166that a subscription to sensor data needs to be created, and DSP module166 creating the required subscription by, e.g., invoking the API forsubscribing to data that is exposed by API module 162 in the childhub(s). In one embodiment, the hub may only subscribe with its directchild hub(s), which may in turn subscribe with their own child hub(s),etc., in a step-by-step manner until subscription(s) are made with theappropriate local hub(s) that are directly connected to sensor(s) whosedata is required. For example, if local hub 104 ₁ requires data from anyof sensor(s) 148 ₃, then local hub 104 ₁ may subscribe with its childlocal hub 104 ₂, which in turn subscribes to the appropriate sensor datastreams with its child local hub 104 ₃ so that such data may bepercolated back up from local hub 104 ₃ to local hub 104 ₂ andultimately to local hub 104 ₁. Although described herein, forsimplicity, with respect to registering to receive sensor data, itshould be understood that if the formula specifies a higher-orderstimulus that combines one or more other stimuli and/or raw sensor dataand any of those other stimuli or the higher-order stimulus itself isevaluated at child hub(s), then the IoT platform may also subscribe toreceive the other stimuli or the higher-order stimulus needed toevaluate the formula.

As described, no sensor data is allowed to flow higher up the treehierarchy than where formula(s) that use the data are stored unlessexplicit permission is given by a user in one embodiment. Doing soincreases security, as sensor data is prevented from flowing up to,e.g., a public cloud unless a user allows such a flow of the data. Inaddition, one embodiment manages sensor data streams by performingreference counting of open streams for each sensor device managed by ahub based on the number of formulas that reference the sensor. Inparticular, the reference count may indicate the number of hubs,including the hub itself and any hubs higher up in the tree hierarchythat have subscribed to the particular sensor's data. In such case, areference count of greater than or equal to 1 may indicate that one ormore formulas (stored in the hub itself or a higher hub) reference theparticular sensor data, while a reference count of 0 may indicate thatno active formulas or subscriptions are using the particular sensordata, in which case the data stream may be closed.

FIG. 6 depicts a flow diagram of a method 600 for evaluating sensor dataand activating actuators when stimuli are satisfied, according to anembodiment. Method 600 of FIG. 6 assumes that a formula has already beenpercolated down the tree hierarchy to a hub (which may be cloud hub 102or any of local hubs 104) where the formula is stored and processed. Asshown, method 600 begins at step 602, where the hub receives data forprocessing the formula. In one embodiment, device and cross-protocolgateway module 172 in particular may receive such data. As described,the data for processing a formula may include raw sensor data, receivedfrom either sensor(s) that are directly connected to the hub and/orbased on subscription(s) to such raw data with child hub(s), as well asdata representing one or more stimuli used to evaluate a higher-orderstimulus or the higher-order stimulus itself that is generated locallyor received from child hub(s) based on subscription(s).

As described, when data for evaluating a formula is received by acluster of virtual computing instances (or physical machines), the datamay be converted from a protocol used by devices to send the data andthen distributed for processing to one (or more) of the virtualcomputing instances (or physical machines) using, for example, aconsistent hashing technique. One embodiment may utilize a consistenthash of the hierarchical dot-notation identifiers of sensors from whichdata is received and a number of virtual computing instances (orphysical machines) in the cluster to distribute the sensor data.Further, if any of the virtual computing instances (or physicalmachines) goes down, then raw sensor data that is received may bere-distributed to other virtual computing instance(s) (or physicalmachines(s)) in the cluster according to, e.g., the consistent hashingtechnique. In addition, received data may also be stored, such as inmemory or storage of a host, in an external storage connected through anHBA, or in another storage device.

At step 604, the hub persists the received sensor data and sends thereceived sensor data to its parent hub if the parent hub has subscribedto such data. As described, each hub is aware of sensors in the sub-treeunder itself and subscribes with child hubs to receive data streams ofsensors specified in any formulas that are stored and processed locallywhen those sensors are not directly connected to the hub. For example,local hub 104 ₂ may store and process a formula that requires data fromsensor(s) 148 ₃ that are not directly connected to local hub 104 ₂. Insuch a case, local hub 104 ₂ may subscribe to the data stream(s) ofsensor(s) 148 ₃ with local hub 104 ₂, and local hub 104 ₃ may then sendto local hub 104 ₂ data collected by sensor(s) 148 ₃. Further, if anyhub requires sensor data from a local hub that is not a direct child ofthat hub, then the hub may subscribe with its direct child hub, whichmay in turn subscribe with its own child hub, etc., in a step-by-stepmanner until a subscription is made with the appropriate local hub thatis directly connected to the sensor whose data is required, as describedabove.

At step 606, local hub 104 determines whether a stimulus of the formulais satisfied by the received data. In one embodiment, DSP module 166evaluates the formula to determine whether the stimulus is met. Itshould be understood that the evaluation of formulas does notnecessarily have to occur every time associated data is received. Forexample, humidity and air pressure sensors throughout a city may collectand send minute-by-minute data, but such data may be processed andevaluated just once per hour, or once per day, to take into accountchanges in humidity and air pressure and determine whether a “rainwarning” stimulus is met leading to a response in which actuators (e.g.,servers) send rain warning emails to persons of interest. In such acase, stored data may also be retrieved and used, along with currentlyreceived data, to evaluate the stimulus. Any suitable frequency forprocessing data may be used, such as every time raw data is received,every microsecond, every minute, every hour, every day, or every year.

If the stimulus of the formula is not satisfied by the received data,then no action is taken at step 608. On the other hand, if the stimulusof the formula is satisfied by the received data, then at step 610, thehub instructs one or more actuators 150 to perform actions according tothe response that the formula associates with the stimulus. In oneembodiment, DSP module 166 may evaluate the formula and instructactuator(s) to perform action(s) by sending message(s) to DCPG module172, which translates those message(s) to message(s) using protocol(s)understood by actuator(s) 150 to be triggered. DCPG module 172 thensends the translated message(s) to the NIC of its host, which in turnsends the message(s) through a network to the target actuator 150. Ifany of the actuators 150 in the response are not directly connected tothe hub, then messages instructing those actuators 150 to performactions may be percolated down the tree hierarchy to child hub(s), in astep-by-step manner, until reaching a hub that is directly connected tothe actuators 150. In addition, some embodiments may permit users todefine higher-order responses that are composed of multiple otherresponses and, in such a case, those multiple responses may be triggeredif stimuli associated with the higher-order responses are satisfied.Stimulus inferences may also be stored for later use in, e.g.,determining higher-order stimuli or for analytics purposes.

In a further embodiment, the hub may also access metadata associatedwith a stimulus and/or formula to determine additional details andcriteria for actuator activation. For example, DSP module 166 may accesssuch metadata to determine a duration of actuator activation and amanner of activation. In yet another embodiment, such metadata may beencoded within a response function that is present in the formulaassociating stimulus to response. Returning to the “rain warning”example above, DSP module 166 may trigger server(s) to send a rainwarning e-mail as a response, and metadata encoded within the responsefunction or within the formula may indicate the contents of the emailand/or who to send the email to.

At step 612, the hub sends the stimulus inference to hubs higher in thetree hierarchy, if any, that have subscribed to such data. As described,higher-level hubs may subscribe to receive stimulus data that isrequired, e.g., to evaluate higher-order stimuli specified in formulasthat those hubs store and process. If any (direct or indirect) parenthub has subscribed to a stimulus, then the hub may percolate thestimulus inference up the tree hierarchy, in a step-by-step manner toeach successive parent hub that has subscribed to the stimulus, untilreaching a hub that stores and processes a formula using the stimulus.

At step 614, the hub determines whether any higher-order stimuli informula(s) stored locally have been met by the stimulus in conjunctionwith another stimulus or stimuli or raw sensor data, according todefinitions of the higher-order stimuli. If any higher-order stimulihave been met, then at step 616, the hub (e.g., DSP module 166 therein)instructs the appropriate actuators 150 to perform response(s) informulas that map the higher-order stimuli to those response(s). Similarto ordinary stimuli inferences, if any (direct or indirect) parent hubhas subscribed to a higher-order stimulus, then the hub may alsopercolate the higher-order stimulus inference up the tree hierarchy, ina step-by-step manner to each successive parent hub that has subscribedto the higher-order stimulus, until reaching a hub that stores andprocesses a formula using the higher-order stimulus.

Advantageously, techniques disclosed herein provide an Internet ofThings (IoT) system organized as a tree hierarchy that combines theadvantages of the cloud-based PaaS solutions implementing IoT systemsand the private IoT systems described above. Formulas are defined at acloud hub that is a root of the tree hierarchy and percolated down tohubs, including local hubs, that are logically closest to devicesspecified in the formulas, providing more flexibility than private IoTsystems which require local rule engines to be updated manually in orderto incorporate new domain knowledge and sensors. Further, in contrast toprivate IoT systems, the IoT systems according to embodiments disclosedherein are scalable, both vertically by adding more hubs (e.g., at newlevels) to a tree hierarchy and horizontally by adding processing nodesto a hub. In addition, by processing formulas at hubs logically closestto devices specified in the formulas rather than always in the cloud aswith cloud-based PaaS solutions, network latency issues in sending datato the cloud and receiving instructions back may be avoided, and the IoTsystem is also resilient to network failure when Internet connectivityto the cloud is lost. Each hub according to embodiments disclosed hereinmay also be able to handle failures of individual virtual computinginstances (or physical machines) by re-assigning data processing toother virtual computing instances (or physical machines) in a cluster,providing fault tolerance at the local cluster level. Privacy isprovided by preventing sensor data from being percolated up the treehierarchy beyond hub(s) where formula(s) requiring the sensor data arestored and processed. In addition, formulas may be defined with basicstimuli and responses, as well as with higher-order stimuli andresponses that combine stimuli (with other stimuli and/or raw sensordata) and responses, respectively, which permits users to codifydomain-specific knowledge in a form that is understandable by otherusers and that can be reused to define formulas without having to dealwith low-level devices.

It should be understood that, for any process described herein, theremay be additional or fewer steps performed in similar or alternativeorders, or in parallel, within the scope of the various embodiments,consistent with the teachings herein, unless otherwise stated.

The various embodiments described herein may employ variouscomputer-implemented operations involving data stored in computersystems. For example, these operations may require physical manipulationof physical quantities—usually, though not necessarily, these quantitiesmay take the form of electrical or magnetic signals, where they orrepresentations of them are capable of being stored, transferred,combined, compared, or otherwise manipulated. Further, suchmanipulations are often referred to in terms, such as producing,identifying, determining, or comparing. Any operations described hereinthat form part of one or more embodiments of the invention may be usefulmachine operations. In addition, one or more embodiments of theinvention also relate to a device or an apparatus for performing theseoperations. The apparatus may be specially constructed for specificrequired purposes, or it may be a general purpose computer selectivelyactivated or configured by a computer program stored in the computer. Inparticular, various general purpose machines may be used with computerprograms written in accordance with the teachings herein, or it may bemore convenient to construct a more specialized apparatus to perform therequired operations.

The various embodiments described herein may be practiced with othercomputer system configurations including hand-held devices,microprocessor systems, microprocessor-based or programmable consumerelectronics, minicomputers, mainframe computers, and the like.

One or more embodiments of the present invention may be implemented asone or more computer programs or as one or more computer program modulesembodied in one or more computer readable media. The term computerreadable medium refers to any data storage device that can store datawhich can thereafter be input to a computer system—computer readablemedia may be based on any existing or subsequently developed technologyfor embodying computer programs in a manner that enables them to be readby a computer. Examples of a computer readable medium include a harddrive, network attached storage (NAS), read-only memory, random-accessmemory (e.g., a flash memory device), a CD (Compact Discs)—CD-ROM, aCD-R, or a CD-RW, a DVD (Digital Versatile Disc), a magnetic tape, andother optical and non-optical data storage devices. The computerreadable medium can also be distributed over a network coupled computersystem so that the computer readable code is stored and executed in adistributed fashion.

Although one or more embodiments of the present invention have beendescribed in some detail for clarity of understanding, it will beapparent that certain changes and modifications may be made within thescope of the claims. Accordingly, the described embodiments are to beconsidered as illustrative and not restrictive, and the scope of theclaims is not to be limited to details given herein, but may be modifiedwithin the scope and equivalents of the claims. In the claims, elementsand/or steps do not imply any particular order of operation, unlessexplicitly stated in the claims.

Virtualization systems in accordance with the various embodiments may beimplemented as hosted embodiments, non-hosted embodiments or asembodiments that tend to blur distinctions between the two, are allenvisioned. Furthermore, various virtualization operations may be whollyor partially implemented in hardware. For example, a hardwareimplementation may employ a look-up table for modification of storageaccess requests to secure non-disk data.

Certain embodiments as described above involve a hardware abstractionlayer on top of a host computer. The hardware abstraction layer allowsmultiple contexts to share the hardware resource. In one embodiment,these contexts are isolated from each other, each having at least a userapplication running therein. The hardware abstraction layer thusprovides benefits of resource isolation and allocation among thecontexts. In the foregoing embodiments, virtual machines are used as anexample for the contexts and hypervisors as an example for the hardwareabstraction layer. As described above, each virtual machine includes aguest operating system in which at least one application runs. It shouldbe noted that these embodiments may also apply to other examples ofcontexts, such as containers not including a guest operating system,referred to herein as “OS-less containers” (see, e.g., www.docker.com).OS-less containers implement operating system-level virtualization,wherein an abstraction layer is provided on top of the kernel of anoperating system on a host computer. The abstraction layer supportsmultiple OS-less containers each including an application and itsdependencies. Each OS-less container runs as an isolated process inuserspace on the host operating system and shares the kernel with othercontainers. The OS-less container relies on the kernel's functionalityto make use of resource isolation (CPU, memory, block I/O, network,etc.) and separate namespaces and to completely isolate theapplication's view of the operating environments. By using OS-lesscontainers, resources can be isolated, services restricted, andprocesses provisioned to have a private view of the operating systemwith their own process ID space, file system structure, and networkinterfaces. Multiple containers can share the same kernel, but eachcontainer can be constrained to only use a defined amount of resourcessuch as CPU, memory and I/O. The term “virtualized computing instance”as used herein is meant to encompass both VMs and OS-less containers.

Many variations, modifications, additions, and improvements arepossible, regardless the degree of virtualization. The virtualizationsoftware can therefore include components of a host, console, or guestoperating system that performs virtualization functions. Pluralinstances may be provided for components, operations or structuresdescribed herein as a single instance. Boundaries between variouscomponents, operations and data stores are somewhat arbitrary, andparticular operations are illustrated in the context of specificillustrative configurations. Other allocations of functionality areenvisioned and may fall within the scope of the invention(s). Ingeneral, structures and functionality presented as separate componentsin exemplary configurations may be implemented as a combined structureor component. Similarly, structures and functionality presented as asingle component may be implemented as separate components. These andother variations, modifications, additions, and improvements may fallwithin the scope of the appended claim(s).

What is claimed is:
 1. A computer-implemented method of processing datain an internet-of-things (IoT) system having a plurality of hubs anddevices in a tree hierarchy, comprising: percolating a formula down thetree hierarchy to a hub of the plurality of hubs, the formulaassociating a higher-order stimulus with a response, the higher-orderstimulus and the response defined with respect to a plurality of sensordevices of the devices; forwarding the formula from the hub to a localhub of the hubs in response to determining, at the hub, that the hub isnot logically closest to the plurality of sensor devices; receiving, atthe local hub, data collected by a plurality of sensor devices of thedevices; evaluating, at the local hub, the received data to determinewhether each of a plurality of stimuli is satisfied, wherein thehigher-order stimulus is defined in terms of the plurality of stimuliand is satisfied when each of the plurality of stimuli is satisfied; andin response to the higher-order stimulus being satisfied, causing by thelocal hub one or more actuator devices of the devices to perform theresponse specified in the formula that associates the higher-orderstimulus with the response.
 2. The method of claim 1, wherein: each ofthe plurality of stimuli is associated with a respective name; and thehigher-order stimulus is defined using the names of the plurality ofstimuli.
 3. The method of claim 2, further comprising, displaying a userinterface which lists the names of the plurality of stimuli and acceptsas input a definition of the higher-order stimulus in terms of the namesof the plurality of stimuli.
 4. The method of claim 1, wherein at leastone of the plurality of stimuli is satisfied by data from one of theplurality of sensor devices either exceeding or falling below athreshold value.
 5. The method of claim 1, wherein each of the pluralityof stimuli is defined as part of a respective formula.
 6. The method ofclaim 1, wherein the response is a higher-order response requiring aplurality of other predefined responses to be performed by the one ormore devices.
 7. The method of claim 1, wherein: each of the hubsincluding a respective IoT platform instance; the tree hierarchyincludes a cloud hub from the plurality of hubs as a root node in thetree hierarchy, local hubs from the plurality of hubs as branch nodes inthe tree hierarchy, and the devices as leaf nodes in the tree hierarchy;and the formula is defined at the cloud hub and percolated down the treehierarchy to the local hub.
 8. The method of claim 7, wherein thereceived data includes data received by the one of the local hubs fromat least one child local hub in the tree hierarchy.
 9. The method ofclaim 7, further comprising, sending, by the one of the local hubs to aparent hub in the tree hierarchy, an indication of at least one of oneor more of the plurality of stimuli being satisfied and the higher-orderstimulus being satisfied.
 10. A non-transitory computer readable mediumcomprising instructions to be executed in a computer system to carry outa method of processing data in an internet-of-things (IoT) system havinga plurality of hubs and devices in a tree hierarchy, the methodcomprising: percolating a formula down the tree hierarchy to a hub ofthe plurality of hubs, the formula associating a higher-order stimuluswith a response, the higher-order stimulus and the response defined withrespect to a plurality of sensor devices of the devices; forwarding theformula from the hub to a local hub of the hubs in response todetermining, at the hub, that the hub is not logically closest to theplurality of sensor devices; receiving, at the local hub, data collectedby a plurality of sensor devices of the devices; evaluating, at thelocal hub, the received data to determine whether each of a plurality ofstimuli is satisfied, wherein the higher-order stimulus is defined interms of the plurality of stimuli and is satisfied when each of theplurality of stimuli is satisfied; and in response to the higher-orderstimulus being satisfied, causing by the local hub one or more actuatordevices of the devices to perform the response specified in the formulathat associates the higher-order stimulus with the response.
 11. Thenon-transitory computer readable medium of claim 10, wherein: each ofthe plurality of stimuli is associated with a respective name; and thehigher-order stimulus is defined using the names of the plurality ofstimuli.
 12. The non-transitory computer readable medium of claim 11,the method further comprising, displaying a user interface which liststhe names of the plurality of stimuli and accepts as input a definitionof the higher-order stimulus in terms of the names of the plurality ofstimuli.
 13. The non-transitory computer readable medium of claim 10,wherein at least one of the plurality of stimuli is satisfied by datafrom one of the plurality of sensor devices either exceeding or fallingbelow a threshold value.
 14. The non-transitory computer readable mediumof claim 10, wherein each of the plurality of stimuli is defined as partof a respective formula.
 15. The non-transitory computer readable mediumof claim 10, wherein the response is a higher-order response requiring aplurality of other predefined responses to be performed by the one ormore devices.
 16. The non-transitory computer readable medium of claim10, wherein: each of the hubs including a respective IoT platforminstance; the tree hierarchy includes a cloud hub from the plurality ofhubs as a root node in the tree hierarchy, local hubs from the pluralityof hubs as branch nodes in the tree hierarchy, and the devices as leafnodes in the tree hierarchy; and the formula is defined at the cloud huband percolated down the tree hierarchy to the local hub.
 17. Thenon-transitory computer readable medium of claim 16, wherein thereceived data includes data received by the one of the local hubs fromat least one child local hub in the tree hierarchy.
 18. Thenon-transitory computer readable medium of claim 16, the method furthercomprising, sending, by the one of the local hubs to a parent hub in thetree hierarchy, an indication of at least one of one or more of theplurality of stimuli being satisfied and the higher-order stimulus beingsatisfied.
 19. A system, comprising: a processor; and a memory storing aprogram, which, when executed on the processor, performs an operation ofprocessing data in an internet-of-things (IoT) system having a pluralityof hubs and devices in a tree hierarchy, the operation comprising:percolating a formula down the tree hierarchy to a hub of the pluralityof hubs, the formula associating a higher-order stimulus with aresponse, the higher-order stimulus and the response defined withrespect to a plurality of sensor devices of the devices; forwarding theformula from the hub to a local hub of the hubs in response todetermining, at the hub, that the hub is not logically closest to theplurality of sensor devices: receiving, at the local hub, data collectedby a plurality of sensor devices of the devices; evaluating, at thelocal hub, the received data to determine whether each of a plurality ofstimuli is satisfied, wherein the higher-order stimulus is defined interms of the plurality of stimuli and is satisfied when each of theplurality of stimuli is satisfied; and in response to the higher-orderstimulus being satisfied, causing by the local hub one or more actuatordevices of the devices to perform the response specified in the formulathat associates the higher-order stimulus with the response.
 20. Thesystem of claim 19, wherein: each of the plurality of stimuli isassociated with a respective name; and the higher-order stimulus isdefined using the names of the plurality of stimuli.